package com.cai.dao;

import com.cai.pojo.Role;
import com.cai.pojo.User;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

public interface UserDao {
    public User findByUsername(String username);
    public List<Integer>findRoleIdsByUserId(Integer id);
    //分页查询权限
    public Page<User> selectByCondition(String queryString);
    //操作中间表
    public void setUserAndRole(Map<String, Integer> map);
    public void add(User user);
    public User findUserById(Integer id);
    //编辑时清除关联关系;
    public void deleteAssociation(Integer id);
    public void edit(User user);
    public void delete(Integer id);

}
